export namespace AuthApi {
    /** 登录接口参数 */
    export interface LoginParams {
        captcha: string
        key: string
        password: string
        username: string
    }

    /** 登录接口参数 */
    export interface LoginParams {
        captcha: string
        key: string
        password: string
        username: string
    }

    /** 登录接口返回值 */
    export interface LoginResult {
        access_token: string
        token_type: string
    }

    export interface RefreshTokenResult {
        data: string
        status: number
    }

    /**
     * 获取验证码
     */
    export interface CaptchaResultModel {
        captcha: string
        key: string
    }

    // 手机登录
    export interface LoginCodeParams {
        mobile: number | string
        code: string
    }

    export interface RoleInfo {
        roleName: string
        value: string
    }

    export interface actionRecord {
        createUser: number
        createTime: string
        updateUser: number
        updateTime: null | string
    }

    interface Role extends actionRecord {
        id: number
        mark: number
        name: string
        code: string
        /**
         * 1 正常 2 禁用
         */
        status: 1 | 2
        note: null | string
        sort: number
    }

    interface Authority extends actionRecord {
        id: number
        mark: number
        pid: number
        title: string
        icon: null | string
        path: string
        component: null | string
        target: string
        permission: string
        type: number
        status: number
        note: null | string
        sort: number
        children: Authority[]
        checked: boolean
        open: boolean
        checkedList: any[] | null
    }

    /**
     * @description: Login interface return value
     */
    export interface LoginResultModel {
        access_token: string
        token_type: 'Bearer'
    }

    export interface CaptchaResultModel {
        captcha: string
        key: string
    }

    export interface CaptchaResultModel {
        captcha: string
        key: string
    }
    export interface SmsResultModel {
        captcha: string
        code: number | string
    }

    /**
     * @description: Get user information return value
     */
    export interface GetUserInfoModel {
        id: string
        homePath?: string
        realname: string
        nickname: string
        avatar: string
        roles: string[]
        rolesVo: Role[]
        authorities: Authority[]
        permissionList: string[]
    }

    export interface GetUserInfoModelOrgin {
        id: string
        realname: string
        nickname: string
        avatar: string
        roles: Role[]
        authorities: Authority[]
        permissionList: string[]
    }
}
